<%-- jsp的指令--%>
<%@page pageEncoding="utf-8" contentType="text/html; utf-8" isELIgnored="false" %>
<%-- 导入JSTL标签库--%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
	<head>
		<title>user_list</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<link rel="stylesheet" type="text/css" href="css/style.css" />
		<script type="text/javascript" src="js/jQuery-v3.4.1.js"></script>
		<script type="text/javascript">
			$(function () {
				$("#btn").click(function () {
					window.location = "add_user.jsp";
				})

			})
		</script>
	</head>
	<body>
<%--	${users}--%>
		<div id="wrap" style="width: 90%">
			<div id="top_content"> 
				<div id="header">
					<div id="rightheader">
						<p>2009/11/20<br /></p>
					</div>
					<div id="topheader">
						<h1 id="title">
							<a href="#">main</a>
						</h1>
					</div>
					<div id="navigation">
					</div>
				</div>
				<div id="content">
					<p id="whereami"></p>
					<h1>Welcome!</h1>
					<table class="table">
						<tr class="table_header">
							<td>ID</td>
							<td> 姓名 </td>
							<td> 密码 </td>
							<td> 电话</td>
							<td> 住址</td>
							<td> 注册时间</td>
							<td> 更新时间</td>
							<td> Status</td>
							<td> Operation</td>
						</tr>
						<c:forEach items="${users}" var="u">
						<tr class="row1">
							<td> ${u.id} </td>
							<td> ${u.name} </td>
							<td> ${u.password} </td>
							<td> ${u.phone} </td>
							<td> ${u.address} </td>
							<td> ${u.createTime} </td>
							<td> ${u.updateTime} </td>
							<td> ${u.status} </td>
							<td>
								<a id="del" href="javascript:;">删除</a>&nbsp;<a href="update.user">更新</a>
							</td>
						</tr>
						</c:forEach>
						<script>
							$(function () {
								$("#del").click(function () {
									if(confirm("确定要删除嘛?!")){
										window.location.href = "delete.user?id=${u.id}";
									}
								})
							})
						</script>
					</table>
					<p>
						<input id="btn" type="button" class="button" value="用户注册" />
					</p>
				</div>
			</div>
			<div id="footer">
				<div id="footer_bg">
				ABC@126.com
				</div>
			</div>
		</div>
	</body>
</html>
